<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
      <swiper-slide v-for="item of list" :key="item.id">
        <!--<img class="swiper-img" :src="item.imgUrl"/>-->
        <div class="swiper-img">{{item.context}}</div>
      </swiper-slide>
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'banner',
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        autoplay: 3000
      },
      list: [{
        id: '001',
        context: '第一张'
      }, {
        id: '002',
        context: '第二张'
      }, {
        id: '003',
        context: '第三张'
      }]
    }
  }
}
</script>

<style lang="stylus" scoped>
  .wrapper
    overflow: hidden
    width :100%
    height 0
    padding-bottom 8%
    background: #eee
    .swiper-img
      line-height 100px
      text-align center
      width :100%
      height :100%
</style>
